<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>修改密保页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.validate.js"></script>
  </head>
  
  <body>
    <h2>修改密保</h2>
    <form id="Cmibao" action="teacher/Cmibao" method="post">
     	<input class="form-control"  type="text" id="mibao" name="mibao" placeholder="密保问题"/><br>
   		<input class="form-control" type="text" name="mibaoAnswer" id="mibaoAnswer" placeholder="密保答案"/><br>
  		<input type="submit" class="btn btn-primary" value="修改">
    </form>
    <script type="text/javascript">
    var error='${error}';
    if(error.length>0){
    alert(error);
    }
    
     //验证成功后，触发事件
  $.validator.setDefaults({
    submitHandler: function() {
      alert("确定修改!");
       from.submit();
    }
});
//表单验证
  $().ready(function() {
  $("#Cmibao").validate({
  rules:{
  	mibao:{
  	required:true
  	},
  	mibaoAnswer:{
  	required:true
  	}
  },
  messages:{
  	mibao:{
  		required:"请输入密保"
  	},
  	mibaoAnswer:{
		 required:"密保答案不能为空"
  	}
  }
  });
  });
    </script>
  </body>
</html>
